﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BuXiaChu.OrderDishes.Model;
using BuXiaChu.OrderDishes.BLL;
using BuXiaChu.OrderDishes.BLL.Constants;

namespace BuXiaChu.OrderDishes.Web.Admin.Employees
{
    public partial class Index : System.Web.UI.Page
    {
        protected List<ShareCodeModel> jobTitleList = CodeDictionary.Instance.GetListByClassID(CodeDictionaryConstants.JobTitle);
        protected void Page_Load(object sender, EventArgs e)
        {
            InitData();
        }

        private void InitData()
        {
            sel_JobTitle.Items.Add(new ListItem("请选择","-1"));
            foreach (var item in jobTitleList)
            {
                sel_JobTitle.Items.Add(new ListItem(item.Name,item.CodeID.ToString()));
            }

            var cityList = CodeDictionary.Instance.GetAllArea();
            sel_City.Items.Add(new ListItem("请选择", "-1"));
            foreach (var item in cityList)
            {
                if (item.ParentId == 0)
                {
                    sel_City.Items.Add(new ListItem(item.Name, item.Id.ToString()));
                }
            }
        }
    }
}
